"use strict"

/**
 * 四川政府采购网爬虫
 *  
 */

var Base = require("./base");
var sc_spider = new Base();
sc_spider.name = "四川采购网";
sc_spider.page = 5;

sc_spider.getPageUrl = function(pg) {
    return "http://www.sczfcg.com/CmsNewsController.do?method=recommendBulletinList&moreType=provincebuyBulletinMore&channelCode=cggg&rp=25&page=" + pg;
};

sc_spider.getItems = function($) {
    var items = [];
    $(".colsList ul li a").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.text();
        item.url = "http://www.sczfcg.com" + e.attr("href");
        item.source = sc_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = sc_spider;